import os, os.path
import random
import string

import cherrypy
import sys

file_path = os.path.abspath(os.path.dirname(__file__))

class WebPage(object):
    @cherrypy.expose
    def index(self):
        return open(file_path+'/index.html')

if __name__ == '__main__':
    conf = {
        '/': {
            'tools.sessions.on': True,
            'tools.staticdir.root': os.path.abspath(os.getcwd())
        },
        '/static': {
            'tools.staticdir.on': True,
            'tools.staticdir.dir': file_path + '/static'
        }
    }
    webapp = WebPage()
    cherrypy.config.update({'server.socket_host': '0.0.0.0',
                            'server.socket_port': 19000})
    cherrypy.quickstart(webapp, '/', conf)
